package com.itrus.spring.dependency;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;

@EnableAsync
public class HelloService {
    /**
     * 循环依赖自己
     */
    @Autowired
    private HelloService helloService;


    @Async
    public void hello() {
        System.out.println("hello：" + Thread.currentThread().getName());
    }
}